import request from '@/axios'
import type { OrderType } from './types'

export const getListApi = (params: any) => {
  return request.get({ url: '/serviceOrder/getList', params })
}

export const changeStatusApi = (data: any): Promise<IResponse<any>> => {
  return request.post({ url: '/serviceOrder/changeStatus', data })
}

export const finishOrderApi = (data: any): Promise<IResponse<any>> => {
  return request.post({ url: '/serviceOrder/finishOrder', data })
}

export const updateWorkInfoApi = (data: any): Promise<IResponse<any>> => {
  return request.post({ url: '/serviceOrder/updateWorkInfo', data })
}

export const changeNotifyApi = (data: any): Promise<IResponse<any>> => {
  return request.post({ url: '/serviceOrder/changeNotify', data })
}

export const businessChangeApi = (data: any): Promise<IResponse<any>> => {
  return request.post({ url: '/serviceOrder/businessChange', data })
}

export const cancelNotifyApi = (data: any): Promise<IResponse<any>> => {
  return request.post({ url: '/serviceOrder/cancelNotify', data })
}

export const getInfoApi = (params: any): Promise<IResponse<any>> => {
  return request.get({ url: '/serviceOrder/getInfo', params })
}
